<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Filters.aspx.cs" Inherits="Filters" %>

<asp:Content ID="Content1" ContentPlaceHolderID="header" Runat="Server">
  Filters
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" Runat="Server">
  <asp:GridView ID="gridFilters" runat="server" CellPadding="4" 
    DataSourceID="sdsFilters" ForeColor="#333333" GridLines="None" 
    AutoGenerateColumns="False" DataKeyNames="id" 
    onrowcommand="gridFilters_RowCommand">
    <RowStyle BackColor="#EFF3FB" />
    <Columns>
      <asp:ButtonField CommandName="cmdView" Text="View" ButtonType="Button" />
      <asp:BoundField DataField="filter" HeaderText="Filter Name"  />
      <asp:BoundField DataField="where_clause" HeaderText="SQL Where Clause"  />
    </Columns>
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#2461BF" />
    <AlternatingRowStyle BackColor="White" />
  </asp:GridView>
  <asp:SqlDataSource ID="sdsFilters" runat="server"
    ConnectionString="<%$ ConnectionStrings:Main %>" 
    SelectCommand="SELECT id,filter,where_clause FROM [filters] ORDER BY filter">
  </asp:SqlDataSource>
</asp:Content>

